// 自动按需引入 Vant 组件
import {
  CheckboxGroup,
  Checkbox,
  Field,
  Toast,
  Tab,
  Tabs,
  Overlay,
  Sticky,
  Picker,
  ActionSheet,
  Popup,
  Grid,
  GridItem,
  Image as VanImage,
  RadioGroup,
  Radio,
  Rate,
  Cascader,
  Area,
  Search,
  Step,
  Steps,
  Button,
  Form,
  Uploader,
  AddressList,
  PickerGroup,
  DatePicker,
  TimePicker,
  ImagePreview,
  CellGroup,
  Loading,
  Notify,
  Icon,
  Empty,
  Dialog,
  Cell,
} from "vant";
const vantUIs = [
  Checkbox,
  Toast,
  Tab,
  Tabs,
  Overlay,
  Sticky,
  Picker,
  ActionSheet,
  Popup,
  Grid,
  GridItem,
  VanImage,
  RadioGroup,
  Radio,
  Rate,
  Cascader,
  Area,
  Search,
  Step,
  Steps,
  Button,
  Form,
  Uploader,
  AddressList,
  PickerGroup,
  DatePicker,
  TimePicker,
  ImagePreview,
  CheckboxGroup,
  Field,
  TimePicker,
  ImagePreview,
  Button,
  Form,
  Steps,
  Button,
  Uploader,
  AddressList,
  PickerGroup,
  Field,
  TimePicker,
  ImagePreview,
  Button,
  Form,
  CellGroup,
  Loading,
  Search,
  Step,
  Steps,
  Button,
  Notify,
  Icon,
  Empty,
  Dialog,
  Cell,
];
export default {
  install(Vue) {
    vantUIs.forEach((vantUI) => {
      Vue.component(vantUI.name, vantUI);
      Vue.use(vantUI); // 也可以使用 Vue.use()
    });
  },
};
